<?php
namespace app\techn_api_n\controller\v1;
use think\Db;
class Service extends Base
{
	public function _initialize()
	{
		parent::_initialize();
	}

	/**
	 * 服务列表
	 */
	public function lists()
	{
		$result['code'] = -1;
		$result['msg'] = "非法请求";
		$map = [
			'is_shelves' => 1,
			'is_delete_time' => 0
		];
		$list_data = Db::name('service')->where($map)->order('sort asc')->select();
		if(!empty($list_data))
		{
			$result['code'] = 0;
	        $result['msg'] = "请求成功";
	        $result['data'] = $list_data;
		}else
		{
			$result['code'] = -1;
	        $result['msg'] = "暂无数据";
		}
		echo json_encode($result);
	}
}